/*
 * BatchQueryProcessor.h
 *
 *  Created on: Oct 22, 2011
 *      Author: gassa
 */

#ifndef BATCHQUERYPROCESSOR_H_
#define BATCHQUERYPROCESSOR_H_

#include <iostream>
#include "IQueryProcessor.h"


class BatchQueryProcessor: public IQueryProcessor {
private:
	static bool instanceFlag;
	static BatchQueryProcessor* instance;
	int current_qr_index;
	string filePath;
	BatchQueryProcessor();
public:
	/**
	 * @brief static
	 */
	inline static BatchQueryProcessor* getInstance() {
		if (!instanceFlag) {
			instance = new BatchQueryProcessor();
			return instance;
		}
		return instance;
	}
	virtual ~BatchQueryProcessor();
    void setFilePath(string filePath);
    vector<QueryRepresentation> processQuery();
    string loadQueryFile();
    QueryRepresentation processTopBolck(ifstream &ifs);
};

#endif /* BATCHQUERYPROCESSOR_H_ */
